package vip.web3.api.dao.biz;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import vip.web3.api.entity.biz.UserEntity;
import vip.web3.api.vo.biz.InviteUserVo;

import java.util.List;

/**
 * aut-horlilei
 */
@Mapper
public interface UserDao extends BaseMapper<UserEntity> {
    List<InviteUserVo> listInvite(Integer userId, Integer level);

    @Select("select count(*) from a_user where user_id = #{userId} and type = 1")
    Integer countUserOrders(@Param("userId") Integer userId);


}
